package cn.shop.dys.dao;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import cn.shop.dys.bean.UserAginstinfo;
import cn.shop.dys.db.UserAgAinstInfo;
import cn.shop.dys.db.UserAginstHelper;

/**
 * Created by zhouxiang on 2016/4/20.
 */
public class UserAgainstDao {

    private UserAginstHelper helper;
    private SQLiteDatabase db;

    public  UserAgainstDao(Context context){
        helper = new UserAginstHelper(context);
    }

    public  void  add(UserAginstinfo info){
        db = helper.getWritableDatabase();
        if (db.isOpen()){
            ContentValues values = new ContentValues();
            values.put(UserAgAinstInfo.COLUMN_EMAIL,info.getUserinfo());
            values.put(UserAgAinstInfo.COLUMN_EVALUATE,info.getEvaluate());

            db.insert(UserAgAinstInfo.TABLE_NAME, null, values);
            db.close();



        }
    }
}
